
import axios from 'axios'
const server = axios.create({
    baseURL:'http://localhost:8080', 
    timeout:5000
})
server.interceptors.request.use(config=>{
    config.headers['token'] = 'afafafa'
    return config
})
server.interceptors.response.use(res=>{
    if(res.code == 201){
        alert('后台请求失败了，请联系管理员')
    }

    return res.data
})
export default server